import click
from flask import Flask
from extensions import register_extensions
from app.routers import register_blueprints
from app.commands import register_commands



def create_app() -> Flask:
    app = Flask(__name__)
    app.config.from_pyfile('./app/settings.py')
    register_extensions(app)
    register_blueprints(app)
    register_commands(app)
    return app



app = create_app()
celery = app.extensions['celery']



if __name__ == '__main__':
    app.run(debug=False)